package com.gosophia.conferenceManagement.common.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;

import com.gosophia.conferenceManagement.common.dao.DocumentDao;
import com.gosophia.conferenceManagement.common.entity.ConferenceJobData;
import com.gosophia.conferenceManagement.common.entity.Document;
import com.gosophia.conferenceManagement.common.service.ConferenceQueryService;
import com.gosophia.conferenceManagement.dao.ConferenceJobDataDAO;
/**
 * 功能：会议查询服务实现     
 * @author wangxinbing
 * @since  2011-3-30
 *  Copyright (c) 2010 Gosophia corporation All Rights Reserved
 */
@Transactional
@Service("conferenceQueryService")
public class ConferenceQueryServiceImpl implements ConferenceQueryService {

	@Autowired
	private DocumentDao documentDao;
	@Autowired
    private ConferenceJobDataDAO conferenceJobDataDAO;
	
	@Override
	public Document findDocumentByDocumentId(Long docId) {
		Assert.notNull(docId,"docId不能为null");
		return documentDao.get(docId);
	}
 
    
    public List<ConferenceJobData> findConferenceJobDataList(Long missionId,String jobType){
        return  conferenceJobDataDAO.getListByNamedQuery("conferenceQueryService.findJobDataListByMissionIdAndJobType", missionId,jobType);
       
    }
 
}
